.translation-item {
  &:hover {
    .form-helpers {
      pointer-events: all;
      opacity: 1;
    }
    .button-submit {
      pointer-events: all;
      opacity: 1;
    }
  }
}

.revert-button {
  position: absolute;
  right: 8px;
  top: -30px;

  :global(.label) {
    padding-left: 3px;
    padding-right: 3px;
  }
}

.item-details__column {
  position: relative;
}

.item-details {
  display: flex;
  flex-direction: column;

  &[data-dir='rtl'] {
    .revert-button {
      right: auto;
      left: 8px;
    }

    .item-details__column {
      align-items: flex-end;
    }

    .item-details__column:first-of-type {
      margin-right: 0;
      margin-left: 15px;
    }

    .item-key {
      margin-right: 0;
      margin-left: 15px;
      flex-direction: row-reverse;
    }

    .item-key-prefix::before {
      content: '';
    }

    .item-key-prefix::after {
      content: '/';
    }
  }
}

.item-details__column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.item-details__column:first-of-type {
  margin-right: 15px;
}

.translation-item.resolved {
  background: var(--color-primary-opacity-10);
}

.translation-item.errored {
  .textInput {
    border-color: var(--color-error);
  }
}

.error {
  font-size: 12px;
  font-weight: bold;
  color: var(--color-error);
}

.button-submit {
  display: flex;
  justify-content: flex-end;
  position: absolute;
  pointer-events: none;
  opacity: var(--grid-item-actions-opacity);
  gap: 0;
  bottom: 15px;
  right: 10px;
  z-index: 3;
  transition: 0.2s ease-in-out;
  transition-property: opacity;

  &[data-dir='rtl'] {
    right: auto;
    left: 7px;
    flex-direction: row-reverse;
  }
}

.textInput {
  flex-grow: 1;
  flex-shrink: 0;
  width: 100%;
  font-size: 13px;
}

.item-text {
  display: block;
  width: 100%;
  color: var(--color-black);
  line-height: 1.4;
  padding: 3px 10px 10px 0;
  font-size: 13px;
  line-height: 1.6;
  cursor: pointer;
  word-break: break-word;

  &:focus,
  &:hover {
    outline: none;
    opacity: 0.8;
  }
}

.form-helpers {
  pointer-events: none;
  opacity: 0;
  position: relative;
  z-index: 1;
  transition: 0.2s ease-in-out;
  transition-property: opacity;
}
